﻿using System;
using System.Linq;
using System.Collections.Generic;

namespace Codeplus.Dhruvtaata.Web.Models.EntityAction {
    public interface ICrudAction<T> {
        void SetDataContext(DatabaseContext context);
        void Create(T entity);
        IEnumerable<T> Retrieve(Func<T, bool> condition, Func<T, object> orderBy, int start, int range);
        void Update(T oldEntity, T newEntity);
        void Delete(T entity);
    }
}
